import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { WithdrawQuery, WithdrawVO, auditForm } from '@/api/operates/withdraw/types';

/**
 * 提现列表
 * @param query 
 * @returns 
 */
export const listWithdraw = (query: WithdrawQuery): AxiosPromise<TableInfoVO<WithdrawVO>> => {
  return request({
    url: '/withdraw/list',
    method: 'get',
    params: query
  });
};

/**
 * 提现审核
 * @param data 
 * @returns 
 */
export const auditWithdraw = (data: auditForm) => {
  return request({
    url: '/withdraw/audit',
    method: 'post',
    data: data
  });
};